<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.virtualization.VMHost</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        <a href="simvoc.core.virtualization-module.html">Module&nbsp;virtualization</a> ::
        Class&nbsp;VMHost
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class VMHost</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VMHost">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_simvoc_c_49" name="uml_class_diagram_for_simvoc_c_49">
<area shape="rect" id="node117" href="simvoc.core.virtualization.VMHost-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,247,657,265"/>
<area shape="rect" id="node1" href="simvoc.core.virtualization.VMHost-class.html" title="Represents a physical machine that has a Virtual Machine Monitor installed and is capable of hosting virtual machines." alt="" coords="5,214,669,271"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#claim" title="Marks the machine as claimed for scheduling purposes" alt="" coords="217,39,456,57"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#free" title="Marks the machine as free (unclaimed) for scheduling purposes" alt="" coords="217,57,456,76"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#shut_down" title="Shuts down the machine, killing any job that happens to be running at the &#160;time." alt="" coords="217,76,456,95"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#adjust_length" title="Adjusts the length of a job based on the CPU/network consumption of the &#160;job." alt="" coords="217,95,456,113"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#add_capability" title="Adds a machine&#45;specific capability to the simulated machine (e.g." alt="" coords="217,113,456,132"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#get_capability" title="Returns: &#160;instance of an object providing a named capability, or None if this machine does not provide the requested service" alt="" coords="217,132,456,151"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#remove_capability" title="Removes a capability from this machine." alt="" coords="217,151,456,169"/>
<area shape="rect" id="node118" href="simvoc.core.cluster_sim.Machine-class.html#__str__" title="str(x)" alt="" coords="217,169,456,188"/>
<area shape="rect" id="node2" href="simvoc.core.cluster_sim.Machine-class.html" title="Simulated cluster node." alt="" coords="205,6,467,194"/>
</map>
  <img src="uml_class_diagram_for_simvoc_c_49.gif" alt='' usemap="#uml_class_diagram_for_simvoc_c_49" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Represents a physical machine that has a Virtual Machine Monitor 
  installed and is capable of hosting virtual machines. Access to the VMM 
  service is provided via the &quot;vmm&quot; capability of the Machine, 
  which can be obtained by calling the get_capability() method.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.virtualization.VMHost-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">vmm_name</span>,
        <span class="summary-sig-arg">sim</span>,
        <span class="summary-sig-arg">cpu_oh</span>=<span class="summary-sig-default">0.0</span>,
        <span class="summary-sig-arg">net_oh</span>=<span class="summary-sig-default">0.0</span>,
        <span class="summary-sig-arg">net_bound</span>=<span class="summary-sig-default">50</span>,
        <span class="summary-sig-arg">state_callback</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VMHost.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#add_capability" class="summary-sig-name">add_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>,
        <span class="summary-sig-arg">cap_obj</span>)</span><br />
      Adds a machine-specific capability to the simulated machine (e.g.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.add_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#adjust_length" class="summary-sig-name">adjust_length</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">length</span>,
        <span class="summary-sig-arg">cpu</span>,
        <span class="summary-sig-arg">net</span>)</span><br />
      Adjusts the length of a job based on the CPU/network consumption of 
      the job.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.adjust_length">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="claim"></a><span class="summary-sig-name">claim</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Marks the machine as claimed for scheduling purposes
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.claim">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="free"></a><span class="summary-sig-name">free</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Marks the machine as free (unclaimed) for scheduling purposes
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.free">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#get_capability" class="summary-sig-name">get_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>)</span><br />
      Returns:
      instance of an object providing a named capability, or None if this 
      machine does not provide the requested service
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.get_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#remove_capability" class="summary-sig-name">remove_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>)</span><br />
      Removes a capability from this machine.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.remove_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#shut_down" class="summary-sig-name">shut_down</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">time</span>,
        <span class="summary-sig-arg">simobj</span>)</span><br />
      Shuts down the machine, killing any job that happens to be running at
      the time.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.shut_down">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">vmm_name</span>,
        <span class="sig-arg">sim</span>,
        <span class="sig-arg">cpu_oh</span>=<span class="sig-default">0.0</span>,
        <span class="sig-arg">net_oh</span>=<span class="sig-default">0.0</span>,
        <span class="sig-arg">net_bound</span>=<span class="sig-default">50</span>,
        <span class="sig-arg">state_callback</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">**kwds</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VMHost.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the machine</li>
        <li><strong class="pname"><code>vmm_name</code></strong> (str) - Name of the VMM installed on the machine</li>
        <li><strong class="pname"><code>sim</code></strong> - Reference to the simulator object</li>
        <li><strong class="pname"><code>cpu_oh</code></strong> (float) - Virtualization overhead for processes that are fully CPU bound, 
          expressed as a decimal floating point value (e.g. 0.1 for 10%)</li>
        <li><strong class="pname"><code>net_oh</code></strong> (float) - Virtualization overhead for processes that are fully network 
          bound, expressed as a decimal floating point value</li>
        <li><strong class="pname"><code>net_bound</code></strong> (number) - Threshold at which a process is considered fully network bound, 
          expressed as a whole percentage number (e.g. 10 for 10%)</li>
        <li><strong class="pname"><code>state_callback</code></strong> - Optional state callback for the *host* machine (see <a 
          href="simvoc.core.cluster_sim.Machine-class.html" 
          class="link">cluster_sim.Machine</a> for more information)</li>
        <li><strong class="pname"><code>kwds</code></strong> - Host machine extra data. If the extra data include a 
          &quot;classAds&quot; keyword argument, then a special classAd 
          ({'IS_METAL': 'TRUE'}) will be added to the supplied classAds.</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:33 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
